<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
	<meta name="google" content="notranslate">
	<title>jk-Blog</title>
	<link rel='stylesheet' id='global-css'  href='/css/style.css?ver=4.4.2' type='text/css' media='all' />
	<script type='text/javascript' src='/script/libs.min.js?ver=4.4.2'></script>
	<script type='text/javascript' src='/script/functions.js?ver=4.4.2'></script>
	<script type='text/javascript' src='/script/common.js'></script>
	<script type="text/javascript">
    $(document).ready(function () {
        $(document).on("click", "#btn_login", function(){
            var url = "http://127.0.0.1/login";
            var loginAccount = $("#loginAccount").val();
            var password = $("#password").val();
            var param = {
            		loginAccount: loginAccount
                    ,password: password
                };
            ajax.get(url, param, gotoLogin);
        });
      });

    function gotoLogin(data){
        if(data.resCode == 1){
            window.open("article_list.html", "_self");
        } else {
            alert(data.resMessage);
        }
    }
	</script>
</head>
<body>
	<div id="wrap" class="wrap">
		<section class="login-content">
			<header>
				<h2><img class="xiong" src="images/logo-x.png"></h2>
			</header>
			<fieldset class="form">
					<div class="form-group">
						<div class="input-group">
							<div class="input-group-addon"><img class="js-svg" src="images/svg/user.svg"></div>
							<input required type="text" class="form-control" name="loginAccount" id="loginAccount" placeholder="用户名/邮箱/电话">
						</div>
					</div>
					<div class="form-group">
						<div class="input-group">
							<div class="input-group-addon"><img class="js-svg" src="images/svg/password.svg"></div>
							<input required type="password" name="password" id="password" class="form-control" placeholder="密码">
						</div>
					</div>

					<div class="checkbox">
						<a href="create-account.html">注册用户</a>
						<p>
							<span class="ui-checkbox1"><input name="checkbox" type="checkbox"> <label for="checkbox"></label></span> 下次自动登录
						</p>
					</div>
					<button id="btn_login" class="btn btn-block btn-lg btn-info">登录</button>
			</fieldset>
		</section>
	</div>
</body>
</html>